﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NPipeline.Driver
{
    public class GenericStageDriverFactory<T> : IStageDriverFactory 
        //where T : IStageDriver
    {
        #region IStageDriverFactory Members

        public IStageDriver CreateDriver(IStage stage, IStageContext context)
        {
            object[] parameters = { stage, context };
            return (IStageDriver) Activator.CreateInstance(typeof(T), parameters );
        }

        #endregion
    }
}
